package factory.abstractfactory;

/**
 * @author wcj
 * @Date 2021/6/20 22:28
 * @Version 1.0
 */
public class ColorFactory extends AbstractFactory {
    @Override
    public Operation getOperation(String s) {
        return null;
    }

    @Override
    public Color getColors(String s) {
        if (s.equals("red")) {
            return new RedColor();
        } else if (s.equals("blue")) {
            return new BlueColor();
        } else if (s.equals("yellow")) {
            return new YellowColor();
        } else {
            return null;
        }
    }
}
